from werkzeug.local import Local
from threading import Thread

local = Local()

local.request = 'abc'


class test(Thread):
    def run():
        loc.request = '12345'
        print('子线程', loc.request)


t = test()
t.start()
t.join()
print('主线程', loc.request)
